function [EEGDataChanlocs] = ImportLayoutInCurrentEEG( EEGDataChanlocs, layoutStructure )
%UNTITLED2 Summary of this function goes here
%   Use this method to import the layoutStructure used by Martin Bleichener

Xm = layoutStructure.pos(:,1)-mean(layoutStructure.pos(:,1));
Xs = max(abs(Xm));
Xt = Xm/Xs;

Ym = layoutStructure.pos(:,2)-mean(layoutStructure.pos(:,2));
Ys = max(abs(Ym));
Yt = Ym/Ys;
    

for c=1:size(EEGDataChanlocs,2)
    
    p = strmatch(EEGDataChanlocs(c).labels, layoutStructure.label, 'exact');
    LocX = Xt(p);
    LocY = Yt(p);
    
    EEGDataChanlocs(c).X = LocX;
    EEGDataChanlocs(c).Y = LocY;
    EEGDataChanlocs(c).Z = 0;
    
    EEGDataChanlocs(c).chantype='ECoG';
end


end


